//
//  SecCollectionViewCell.m
//  RRIsSmallPig
//
//  Created by K。 on 15/7/24.
//  Copyright (c) 2015年 寇广超. All rights reserved.
//

#import "SecCollectionViewCell.h"

@implementation SecCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if ( self ) {
        [self createSubViews];
    }
    return  self;
    
}
-(void)createSubViews
{
    self.secImageView = [[UIImageView alloc]initWithFrame:CGRectMake(self.contentView.frame.origin.x  + 5, self.contentView.frame.origin.y + 5 , 160, 85)];
    [self.contentView addSubview: _secImageView];
    
    self.secLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.contentView.frame.origin.x, self.contentView.frame.origin.y + 90, 170,30)];
   // self.secLabel.backgroundColor = [UIColor redColor];
    self.secLabel.textAlignment =NSTextAlignmentCenter;
    [self.contentView addSubview:_secLabel];
    

}

-(void)layoutSubviews
{
    [super layoutSubviews];
    [_secImageView sd_setImageWithURL:[NSURL URLWithString:_secModel.imagePath] placeholderImage:nil];
    NSLog(@"/////**** === %@",_secImageView.image);
    _secLabel.text = _secModel.name;
    
  

}

@end
